<?php

/******************************************************************/
/***********PARMETRE BDD*******************************************/
define("USER", "postgres");
define("PASS", "admin");
define("HOST", "localhost");
define("PORT","5432");
define("DBNAME", "videoclub");
//define("DNSPOSTGRESQL", "pgsql:host=localhost;port=5432;dbname=videoclub");
define("DNSPOSTGRESQL", "pgsql:host=".HOST.";port=".PORT.";dbname=".DBNAME);

/* NOMS DES TABLES DEANS LA BDD */
define("ACTEURS", "ACTEURS");
define("BANQUES", "BANQUES");
define("CLIENTS", "CLIENTS");
define("FILMS", "FILMS");
define("GENRES", "GENRES");
define("LOCATIONS", "LOCATIONS");
define("PAYS", "PAYS");
define("REALISATEURS", "REALISATEURS");
define("FILM_ACTEUR", "FILM_ACTEUR");
define("FILM_GENRE", "FILM_GENRE");
define("FILM_PAYS", "FILM_PAYS");
define("FILM_REAL", "FILM_REAL");

/* NOMS DES ATTRIBUTS PAR TABLES, PUTAIN CA VA ETRE LONG.................PAS FORCEMENT UTILE????...*/
/*ACTEURS*/
define("ACTEURS_ID", "a_id");
define("ACTEURS_NOM", "a_nom");
/*BANQUES*/
define("BANQUES_CODE", "bq_code");
define("BANQUES_LIB", "bq_lib");
/*CLIENTS*/
define("CLIENTS_ID", "cl_id");
define("CLIENTS_PWD", "cl_pwd");
define("CLIENTS_NOM", "cl_nom");
define("CLIENTS_PRENOM", "cl_prenom");
define("CLIENTS_MAIL", "cl_mail");
define("CLIENTS_RIB_BANQUE_", "rib_banque");
define("CLIENTS_RIB_AGENCE", "rib_agence");
define("CLIENTS_RIB_CPTE", "rib_cpte");
define("CLIENTS_RIB_CLE", "rib_cle");
define("CLIENTS_STATUS", "cli_status");
/*FILMS*/
define("FILMS_ID", "f_id");
define("FILMS_TITRE", "f_titre");
define("FILMS_ANNEE", "f_annee");
define("FILMS_DUREE", "f_duree");
define("FILMS_STATUS", "f_status");
define("FILMS_LIM_RES", "f_lim_res");
define("FILMS_DEB_LOC", "f_deb_loc");
define("FILMS_CL_ID", "f_cl_id");
/*GENRES*/
define("GENRES_ID", "g_id");
define("GENRES_NOM", "g_nom");
/*LOCATIONS*/
define("LOCATIONS_LOC_FILM", "loc_film");
define("LOCATIONS_LOC_CLI", "loc_cli");
define("LOCATIONS_LOC_MONTANT", "loc_montant");
/*PAYS*/
define("PAYS_ID", "p_id");
define("PAYS_NOM", "p_nom");
/*REALISATEURS*/
define("REALISATEURS_R_ID", "r_id");
define("REALISATEURS_R_NOM", "r_nom");
/*FILM_ACTEUR*/
define("FILM_ACTEUR_F_ID", "f_id");
define("FILM_ACTEUR_A_ID", "a_id");
/*FILM_GENRE*/
define("FILM_GENRE_F_ID", "f_id");
define("FILM_GENRE_G_ID", "g_id");
/*FILM_PAYS*/
define("FILM_PAYS_F_ID", "f_id");
define("FILM_PAYS_P_ID", "p_id");
/*FILM_REAL*/
define("FILM_REAL_F_ID", "f_id");
define("FILM_REAL_R_ID", "r_id");

/******************************************************************
*STATUS
*/
//'Disponible, Réservé, Loué, Non retourné, Indisponible'
/*status films*/
define("DISPONIBLE","D");
define("RESERVER","R");
define("LOCATION","L");
define("NON_RETOURNER","NR");
define("INDISPONIBLE","I");
/*status clients*/
define("PAYEMENT_EN_COURS","PC");
define("ARRET","AR");
define("OK","OK");

/******************************************************************/
/***********TARIFICATION*******************************************/

define("EUROS", "€");

define("DROIT_DE_GESTION", 1);
/* Premiere tranche : les douzes premières heure, ex, 1 euro */
define("PRIX_PAR_HEURE_DANS_PREMIERE_TRANCHE", 1);
/* deuxieme tranche : entre 12 et 24, ex, un demi euro */
define("PRIX_PAR_HEURE_DANS_DEUXIEME_TRANCHE",0.5);
/* penalité de retard */
define("PENALITEE_DVD_NON_RETOURNER",50);
/* au bout de .. il ya une location gratuite */
define("LOCATION_GRATUITE_POUR",15);

/******************************************************************/


/* Nombre max de location simultanément */
define("NB_MAX_LOCATION_SIMULTANEMENT", 3);
/* Delai max pour retire DVDs, en minutes a voir avec convertion de l appli........*/
define("Delai_Max_RETRAIT_DVD", 90);



/******************************************************************/
/***********MESSAGES***********************************************/
define("AUCUNE_RESERVATION","aucune réservation");